package com.joey.gson_demo.gson;

import com.google.gson.Gson;

import org.json.JSONObject;

/**
 * @author Joey Huang（QQ:273179370）
 * @created 2016/11/11
 */
public class Manager {
    public static void main(){
        JSONObject object=new JSONObject();
        try {
            object.put("mDouble","");

        } catch (Exception e) {
            e.printStackTrace();
        }
        String jsonStr = object.toString();
        Gson gson=new Gson();
        Entity entity = gson.fromJson(jsonStr, Entity.class);
        entity.toString();
    }

    private static class Entity {
        private Double mDouble;

        public Double getDouble() {
            return mDouble;
        }

        public void setDouble(Double aDouble) {
            mDouble = aDouble;
        }
    }
}
